package com.singbon.server.security;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;
/**
 */
public class CustomWebAuthenticationDetails extends WebAuthenticationDetails {
  private static final long serialVersionUID = 6975601077710753878L;
  private final String verifyCode;
  public CustomWebAuthenticationDetails(HttpServletRequest request) {
    super(request);
    // verifyCode为页面中验证码的name
    verifyCode = request.getParameter("verifyCode");
  }
  public String getVerifyCode() {
    return verifyCode;
  }
  @Override
  public String toString() {
    return super.toString() + "; verifyCode: " + this.getVerifyCode();
  }
}
